<template>
  <div class="InfoBoxList">
      <div class="InfoBox" :key="index" v-for="(item, index) in info">
        <a :href="item.src">
          <div class="info-upper">
          <div class="left-image">
            <img :src="item.img" alt="" />
          </div>
          <div class="text-conten">
            <div class="title">{{ item.title }}</div>
            <div class="conten">
              {{ item.conten }}
            </div>
          </div>
        </div>
        </a>
        <div class="info-lower">
          <el-tag :key="index2" v-for="(item2, index2) in item.infoChild" :type="item2.type">{{item2.tag}}</el-tag>
        </div>
      </div>
  </div>
</template>

<script>
export default {
  props: {
    info: Array,
  },
  data() {
    return {
    };
  },
};
</script>

<style lang="scss" scoped>
.InfoBoxList {
  width: 840px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: #000;
}
.InfoBox {
  width: 230px;
  height: 180px;
  padding: 30px 14px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
a {
  text-decoration: none;
}
.InfoBox:hover {
  box-shadow: 0 0 6px rgb(0 0 0 / 10%);
}

.info-upper {
  display: flex;
}

.left-image > img {
  width: 82px;
  height: 100px;
  border-radius: 4px;
}
.text-conten {
  margin-left: 14px;
  color: #707070;
}
.text-conten>.title {
  font-size: 14px;
  // 文本超出三行变小点
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
}
.conten {
  margin-top: 10px;
  color: #707070bd;
  font-size: 14px;
  // 文本超出三行变小点
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}
.info-lower {
  margin-top: 18px;
}
.info-lower > .el-tag + .el-tag {
  margin-left: 8px;
}
</style>
